package config;

public enum OutputCharset 
{
	E_ASC_OC("asc", "US-ASCII"),
	E_UTF8_OC("utf8", "UTF-8"),
	E_UTF16_OC("utf16", "UTF-16"),
	;
	
	private String m_charset;
	private String m_name;
	
	private OutputCharset(String name, String charset)
	{
		m_name = name;
		m_charset = charset;
	}
	
	public static OutputCharset getCharset(String name)
	{
		for(OutputCharset oc: OutputCharset.values())
		{
			if(name.compareTo(oc.m_name) == 0)
			{
				return oc;
			}
		}
		return null;
	}
	
	public static String getErrorText()
	{
		String text = "";
		for(OutputCharset oc: OutputCharset.values())
		{
			text += oc.m_name + " ";
		}
		return text;
	}
	
	public String getCharsetString()
	{
		return m_charset;
	}
}
